function qs = Elnpmu_losses(mix)

% E[ln p(mu)]

[K D] = size(mix.centres);

m0 = mix.varprior.m0;
T0 = mix.varprior.T0;
m = mix.varposterior.m;
T = mix.varposterior.T;

Dlog2pi = D*log(2*pi);
inv_T0 = inv(T0);

q = zeros(1, K);
for k = 1:K
    q(k) = - 0.5*Dlog2pi - 0.5*logdet(T0) - 0.5*(m(k, :)-m0)*inv_T0*(m(k, :)-m0)' - 0.5*trace(T(:, :, k)*inv_T0);
end

qs = sum(q)-q;
